package tinhluong;

import java.text.DateFormat;
import java.text.FieldPosition;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

import com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException;

public class NhanVien {
	private String maSoThue;
	private String hoTen;
	private String ngaySinh;
	private boolean gioiTinh;
	private String diaChi;
	private double soGioLamViec;
	private double tienLuong;
	
	public void nhapThongTin() {
		Scanner s = new Scanner(System.in);
		
		System.out.print("Ma so thue: ");
		maSoThue = s.nextLine();
		
		System.out.print("Ho ten: ");
		hoTen = s.nextLine();
		
		System.out.print("Ngay sinh: ");
		ngaySinh = s.nextLine();

		System.out.print("Dia chi: ");
		diaChi = s.nextLine();
		
		System.out.print("Gioi tinh: ");
		gioiTinh = s.nextBoolean();
		
		System.out.print("So gio lam viec: ");
		setSoGioLamViec(s.nextDouble());
		
	}
	
	public double tinhLuong() {
		if(getSoGioLamViec() < 40) {
			tienLuong = getSoGioLamViec() * 5;
		}
		else {
			tienLuong =  getSoGioLamViec() * 5 * 1.5;
		}
		return tienLuong;
	}
	

	public String getMaSoThue() {
		return maSoThue;
	}

	public void setMaSoThue(String maSoThue) {
		this.maSoThue = maSoThue;
	}

	public String getHoTen() {
		return hoTen;
	}

	public void setHoTen(String hoTen) {
		this.hoTen = hoTen;
	}

	public String getNgaySinh() {
		return ngaySinh;
	}

	public void setNgaySinh(String ngaySinh) {
		this.ngaySinh = ngaySinh;
	}

	public boolean isGioiTinh() {
		return gioiTinh;
	}

	public void setGioiTinh(boolean gioiTinh) {
		this.gioiTinh = gioiTinh;
	}

	public String getDiaChi() {
		return diaChi;
	}

	public void setDiaChi(String diaChi) {
		this.diaChi = diaChi;
	}

	public double getTienLuong() {
		return tienLuong;
	}

	public void setTienLuong(double tienLuong) {
		this.tienLuong = tienLuong;
	}

	public double getSoGioLamViec() {
		return soGioLamViec;
	}

	public void setSoGioLamViec(double soGioLamViec) {
		this.soGioLamViec = soGioLamViec;
	}
	
}
